﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;

namespace System.Data
{
    /// <summary>
    /// 针对 MSSQL 的辅助类
    /// </summary>
    public class MSSQLHelper:BaseSQLHelper
    {
        /// <summary>
        /// 默认的 MS SQL Server 辅助类的构造函数
        /// </summary>
        /// <param name="connectCmd"></param>
        /// <param name="autoOpen"></param>
        public MSSQLHelper(string connectCmd, bool autoOpen = true):base(connectCmd,autoOpen)
        {
            _Connection = new SqlConnection(connectCmd);
            if (autoOpen)
            {
                _Connection.Open();
            }

            _Name = _Connection.Database;
        }
    }
}
